package services
{
	import mx.controls.Alert;
	import mx.messaging.ChannelSet;
	import mx.messaging.channels.AMFChannel;
	import mx.rpc.events.FaultEvent;
	import mx.rpc.remoting.mxml.RemoteObject;
	
	
	public class EntidadesService extends RemoteObject
	{
		public function EntidadesService()
		{
			super();
			var channel:ChannelSet=new ChannelSet();
			var amfChannel:AMFChannel=new AMFChannel("my-amf","http://localhost:8080/Servicios/messagebroker/amf");
			channel.addChannel(amfChannel);
			this.channelSet=channel; 
			this.destination="EntidadesService";
			this.source="services.EntidadesService";  
			this.addEventListener(FaultEvent.FAULT,onFault);
			
		}
		
		public function onFault(event:FaultEvent):void
		{                  
			Alert.show( "Error comunicando con "+this.destination+
				" \nDetalle:"+event.fault.message);         
		}
		
		public function consultas():void
		{
			this.getOperation("consultas").send();
		}

			
		}
}